package com.yukh.framework.base.net.socket;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server extends ServerSocket {

	public Server() throws IOException {
		super(12345);
		try {
			while (true) {
				Socket socket = accept();
				System.out.println(socket.getReceiveBufferSize());
				System.out.println(socket.getInetAddress().getHostAddress());
				System.out.println(socket.getInetAddress().getHostName());
			}
		} catch (IOException e) {
		} finally {
			close();
		}
	}
	
	public static void main(String[] args) throws IOException {
		new Server();
	}
}
